package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;
import java.util.List;

public class SubscribeEndpoint implements Sequenceable, Serializable {

    @SerializedName("channelIds")
    private List<String> channelIds;

    @SerializedName("params")
    private String params;



    public static final Sequenceable.Producer<SubscribeEndpoint> CREATOR = new Producer<SubscribeEndpoint>() {
        @Override
        public SubscribeEndpoint createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            SubscribeEndpoint subscribeEndpoint = new SubscribeEndpoint();
            subscribeEndpoint.unmarshalling(parcel);
            return subscribeEndpoint;
        }
    };
    
    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeStringList(this.channelIds);
        parcel.writeString(this.params);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.channelIds = parcel.readStringList();
        this.params=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "SubscribeEndpoint{" +
                "channelIds=" + channelIds +
                ", params='" + params + '\'' +
                '}';
    }

    public List<String> getChannelIds() {
        return channelIds;
    }

    public void setChannelIds(List<String> channelIds) {
        this.channelIds = channelIds;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }
}
